// Copyright (c) Symbian Ltd 2008. All rights reserved.

#ifndef __RPSAPPUI_H__
#define __RPSAPPUI_H__

// INCLUDES
#include <aknappui.h>
#include "rpsGameEngine.h"


// FORWARD DECLARATIONS
class CRpsAppView;

// CLASS DECLARATION
/**
* CRpsAppUi application UI class.
* Interacts with the user through the UI and request message processing
* from the handler class
*/
class CRpsAppUi : public CAknAppUi, public MEngineObserver
	{
	public: // Constructors and destructor

		/**
		* ConstructL.
		* 2nd phase constructor.
		*/
		void ConstructL();

		/**
		* CRpsAppUi.
		* C++ default constructor. This needs to be public due to
		* the way the framework constructs the AppUi
		*/
		CRpsAppUi();

		/**
		* ~CRpsAppUi.
		* Virtual Destructor.
		*/
		virtual ~CRpsAppUi();

		/**
		* UpdateScreen.
		* From MEngineObserver
		*/
		void UpdateScreen();
		
	private:  // Functions from base classes

		/**
		* From CEikAppUi, HandleCommandL.
		* Takes care of command handling.
		* @param aCommand Command to be handled.
		*/
		void HandleCommandL( TInt aCommand );

		/**
		*  HandleStatusPaneSizeChange.
		*  Called by the framework when the application status pane
 		*  size is changed.
		*/
		void HandleStatusPaneSizeChange();
		

	private: // Data

		/**
		* The application view
		* Owned by CRpsAppUi
		*/
		CRpsAppView* iAppView;
		
		/**
		* The game engine
		* Runs the game loop and inactivity timer
		*/
		CRpsGameEngine* iGameEngine;
	};

#endif // __RPSAPPUI_H__

// End of File
